package cn.javadog.cloud.starter.demo.controller;

import cn.javadog.cloud.starter.limiter.annotation.AccessLimit;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yuy
 * @date 2020-11-06 17:00
 **/
@RestController
@RequestMapping("/limiter")
public class LimiterController {

    @AccessLimit(seconds = 3, maxCount = 1)
    @RequestMapping("/hello")
    public String hello(){
        return "hello world!";
    }
}
